Counter-based entry invalidation for metadata previous write queue

ABSTRACT

Embodiments of the invention relate to counter-based entry invalidation for a metadata previous write queue (PWQ). An aspect of the invention includes writing an address into an entry in the metadata PWQ, the address being associated with an instance of metadata received from a pipeline and setting a valid tag associated with the entry in the metadata PWQ to valid. Another aspect of the invention includes initializing a counter to zero and incrementing the counter based on receiving a count signal from the pipeline until the counter is equal to a threshold. Yet another aspect of the invention includes setting the valid tag to invalid based on the counter being equal to the threshold.

BACKGROUND

The present invention relates generally to computer processing systems,and more specifically, to a metadata previous write queue associatedwith a metadata store in a processor.

A computer program that is executed by a processor in a computing systemmay be broken down into a series of operations. A pipeline architectureof the processor comprises a plurality of stages, and the operationsproceed through the various stages of the pipeline during execution. Inorder to assist a processor pipeline in the execution of a computerprogram so that the execution may be relatively fast and efficient,metadata regarding various operations, such as instructions or datafetches, may be stored in a metadata store that is associated with theprocessor. The metadata may include, but is not limited to, datapredicting the direction of a branch, data regarding the dependencybetween two instructions, or may relate to a data fetch, and may beindexed in the metadata store based on an address associated with themetadata. Subsequent executions of the same operation may produceidentical instances of metadata. It is preferred to not write anyparticular instance of metadata into the metadata store more than once.While writing the same metadata into multiple sets in the metadata storemay not be a data integrity concern, overall performance of themicroprocessor may be reduced by the presence of duplicate entries inthe metadata store, as other unique entries that would further assist inprogram performance may be displaced.

It may be relatively time-consuming and/or power consuming to search themetadata store to determine if a given metadata entry is already in themetadata store prior to writing the metadata entry into the metadatastore. Therefore, in order to prevent duplicate metadata store entries,an operation may have a metadata marking, which indicates that ametadata entry already exists in the metadata store for the particularoperation. Additionally, a previous write queue (PWQ) may be used totrack the most recent entries that were written into in the metadatastore. When a new entry is ready to be written into the metadata store,the new entry may be compared to the metadata PWQ, and, if there is avalid match for the address associated with the operation in themetadata PWQ, it is determined that the new entry is already in themetadata store and does not need to be written into the metadata storeagain.

SUMMARY

Embodiments include a method, system, and computer program product forcounter-based entry invalidation for a metadata previous write queue(PWQ). An aspect of the invention includes writing an address into anentry in the metadata PWQ, the address being associated with an instanceof metadata received from a pipeline and setting a valid tag associatedwith the entry in the metadata PWQ to valid. Another aspect of theinvention includes initializing a counter to zero and incrementing thecounter based on receiving a count signal from the pipeline until thecounter is equal to a threshold. Yet another aspect of the inventionincludes setting the valid tag to invalid based on the counter beingequal to the threshold.

Additional features and advantages are realized through the techniquesof the present invention. Other embodiments and aspects of the inventionare described in detail herein and are considered a part of the claimedinvention. For a better understanding of the invention with advantagesand features, refer to the description and to the drawings.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

The subject matter which is regarded as the invention is particularlypointed out and distinctly claimed in the claims at the conclusion ofthe specification. The forgoing and other features, and advantages ofthe invention are apparent from the following detailed description takenin conjunction with the accompanying drawings in which:

FIG. 1A depicts a computing system in accordance with an embodiment;

FIG. 1B depicts a processor pipeline in accordance with an embodiment;

FIG. 2 depicts a cache and a multi-set associative metadata store inaccordance with an embodiment;

FIG. 3 depicts a congruence class of entries in a metadata store inaccordance with an embodiment;

FIG. 4 depicts a metadata PWQ and a multi-set associative metadata storein accordance with an embodiment;

FIGS. 5A-5B depict systems for counter-based entry invalidation for ametadata PWQ in accordance with various embodiments;

FIGS. 6-8 depict process flows for counter-based entry invalidation fora metadata PWQ in accordance with various embodiments; and

FIG. 9 illustrates a computer program product in accordance with anembodiment.

DETAILED DESCRIPTION

Embodiments of counter-based entry invalidation for a metadata PWQ areprovided, with exemplary embodiments being discussed below in detail. Insome situations, it is possible that an entry that is found in themetadata PWQ may not actually exist in the metadata store. Such an entryin the metadata PWQ may incorrectly block new metadata entries frombeing written into the metadata store. Therefore, entries in themetadata PWQ may be invalidated based on one or more counters in orderto avoid incorrect blocking of entry writes into the metadata store. Oneor more thresholds may be defined for the one or more counters to ensurethat an entry in the metadata PWQ will be invalidated after any otherinstances of the operation associated with the entry that are in thepipeline at the time of the writing of the entry into the metadata storehave completed execution. A threshold may be a predetermined value basedon the depth of the pipeline in some embodiments. In other embodiments,a threshold may be based on a total number of operations that are in thepipeline at the time of an initial write of an entry into the metadataPWQ. In further embodiments, a threshold may be based on a number ofinstances of a particular operation that are in the pipeline at the timeof the initial write of an entry for the particular operation into themetadata PWQ.

Each entry in the metadata PWQ may have an associated valid tag, and anentry may be invalidated by setting its associated valid tag to anappropriate value, e.g., false. Upon the initial write of an entry intothe metadata PWQ, its associated valid bit is set active, e.g., true.When determining if a matching entry for an address exists in themetadata PWQ, the valid bit in the matching entry for the address isalso checked, as in order to determine that a match for an addressexists in the metadata PWQ, the valid bit in the matching entry for theaddress must be set to valid. Invalidated entries may be overwritten bynew entries in the metadata PWQ. Such invalidation of entries in themetadata PWQ prevents incorrect blocking of new entries into themetadata store by the metadata PWQ.

FIG. 1A shows an illustrative embodiment of a computing system 10. Thecomputing system 10 includes a processor 11, which has a cache 12. Thecache 12 may comprise any appropriate type of cache, such as aninstruction cache, a branch table, or a data cache. The computing systemadditionally includes a main memory 13. During execution of anoperation, the processor 11 may check for the cache 12 for dataregarding the operation. If the data regarding the operation is notpresent in cache 11, the processor 11 may retrieve the data regardingthe operation from main memory 13. FIG. 1B shows an illustrativeembodiment of a pipeline 100 having a plurality of stages 101-107, whichmay be incorporated into processor 11 of FIG. 1A. Operations proceedthrough the pipeline from fetch stage 101 through stages 102-106, andare completed at checkpoint stage 107. Metadata corresponding tooperations in the pipeline 100 may be written into a metadata store thatis associated with a metadata PWQ (discussed in further detail below) atcheckpoint stage 107 in some embodiments. An operation may have anyappropriate number of instances in the process of proceeding throughpipeline 100 at once. FIG. 1 is shown for illustrative purposes only; apipeline may have any appropriate number of stages in variousembodiments.

FIG. 2 shows an embodiment of a system 200 including a cache 202 and amulti-set associative metadata store 203 that may be associated with apipeline, such as pipeline 100 that was shown in FIG. 1. Cache 202 maycomprise cache 12 as is shown in FIG. 1A. The cache 202 may comprise anyappropriate type of cache, such as an instruction cache, a branch table,or a data cache. The metadata in the metadata store 203 may be accessedin parallel with the cache 202 using an address 201, which is an addressthat is associated with an operation, for example, that is currentlybeing processed in the pipeline. The metadata store 203 may comprise anarray that associates each instance of metadata with an address, whichmay comprise, for example, an instruction address or data fetch address.An entry may be written into the metadata store 203 when metadata for anoperation becomes known after processing of the operation. Differenttypes of metadata may become available at different stages of thepipeline. For example, branch content may be known at branch resolution,which occurs in a specific part of the pipeline; however, content onstore/load instruction dependencies may only be known at the end of thepipeline. FIG. 3 shows an embodiment of metadata store entries 300 in ametadata store congruence class, such as metadata store 203 of FIG. 2.Metadata store entries 300 include addresses 302, which are associatedwith metadatas 303. The input address 301, which may comprise an addressassociated with an operation currently being processed in an associatedpipeline, is used by hit logic 304 to determine if there is a match forinput address 301 in the addresses 302 of the metadata store entries300. If hit logic 304 determines that there is a match, metadata 303that is read out on metadata store output 306 via multiplexer 305 isused for processing of the operation associated with the address 301 inthe pipeline.

FIG. 4 shows an embodiment of a system 400 including a metadata PWQ 402that is associated with a metadata store 408. System 400 may beincorporated into cache 12 as is shown in FIG. 1A. The metadata PWQ 402as shown in FIG. 4 includes 4 entries; however, this is shown forillustrative purposes only. The number of entries in a metadata PWQ maydepend on, for example, the size of the metadata store associated withthe metadata PWQ, or the depth of the pipeline associated with themetadata store. Each entry in the metadata PWQ 402 has a valid tag 403and an address field 404. Each entry's valid tag 403 is set to true orfalse (indicating whether the entry is valid or invalid) based on acounter, which is discussed in further detail below with respect toFIGS. 5-8. When an operation has metadata to write into the metadatastore 408, the address 401 for the operation and the metadata 405 areboth stored in staging latch 407. The hit logic 406 then determines ifthere is a match for the address 401 in an address field 404 in any ofthe entries in the metadata PWQ 402. If there is a match for address 401in the metadata PWQ 402, it is then determined if the valid tag 403associated with the matching address field 404 in the metadata PWQ isset to true, indicating a valid entry for the address in the metadataPWQ. If there is an entry in the metadata PWQ 402 comprising an addressfield 404 that matches address 401 that has its associated valid tag 403set to true, hit logic 406 determines that there is a hit for theaddress 401 in the metadata PWQ 402, and the metadata 405 and the writeaddress 401 are not written into the metadata store 408. However, ifthere is not a hit for the address 401 in the metadata PWQ 402, the hitlogic 406 instructs the staging latch 407 to write the metadata 405 andthe write address 401 into an entry in the metadata store 408, andadditionally, a new entry is created in the metadata PWQ 402 for theaddress 401 (which is placed in the address field 404) with anassociated valid tag 403 that is set to true. This new entry in themetadata PWQ 402 may overwrite an entry that has its valid tag 403 setto false. If no entry in the PWQ is invalid, a replacement scheme, suchas a round robin or LRU replacement scheme, may be used to determinewhich entry acquires the new data in various embodiments.

FIG. 5A shows an embodiment of a system 500A for counter-based entryinvalidation for a metadata PWQ. System 500A may be incorporated intocache 12 as is shown in FIG. 1A. System 500A includes a metadata PWQ 502having a plurality of entries, each entry including a valid tag 503 andan address field 504. Write address 501 and count signal 507 arereceived from the pipeline, such as pipeline 100 shown in FIG. 1. Countsignal 507 may indicate, for example, each operation that checkpointsprocessing in the pipeline. Counter reset signal 508, multiplexer 509,and increment logic 511 are used to maintain counter 510. The counterreset signal 508 may be triggered by writing of a new entry into themetadata PWQ 502. Threshold 512 defines an upper bound for counter 510,and invalidate logic 513 determines when counter 510 is equal tothreshold 512. In various embodiments, the threshold 512 may be aconstant that is hardwired into the system 500A, a constant that may beconfigurable by a user of the system 500A, or may be determined based onthe current state of the pipeline associated with the system 500A; thisis discussed in further detail below with respect to FIGS. 6-8.

In some embodiments, a system for counter-based entry invalidation for ametadata PWQ may comprise a single counter 510 and associated logic, asis shown in FIG. 5A and discussed in further detail with respect to FIG.6. In other embodiments, a system for counter-based entry invalidationfor a metadata PWQ may comprise plurality of counters and associatedlogic, wherein the number of counters is equal to the number of entriesin the metadata PWQ 502 and each counter acts to invalidate its singleassociated entry in the metadata PWQ 502; this is discussed in furtherdetail with respect to FIG. 5A-B and FIGS. 7-8. An embodiment of asystem 500B for counter-based entry invalidation for a metadata PWQincluding a plurality of counters 510A-D is shown in FIG. 5B. Each ofcounters 510A-D is associated with a single entry in the metadata PWQ502. Each of counters 510A-D has respective associated increment andreset logic, i.e., counter reset signal 508, multiplexer 509, andincrement logic 511, as are shown associated with counter 510 in FIG.5A. In some embodiments, the values of each of counters 510A-D may becompared to a single threshold 512; in other embodiments, each ofcounters 510A-D may have a separate respective threshold 512. FIG. 5B isshown for illustrative purposes only; a system for counter-based entryinvalidation for a metadata PWQ may comprise any appropriate number ofentries in the metadata PWQ and associated counters.

FIG. 6 shows an embodiment of a method 600 for counter-based entryinvalidation for a metadata PWQ. FIG. 6 is discussed with respect toFIG. 5A. Method 600 may be applied in system 500A with a single counter510. In various embodiments of method 600 of FIG. 6, the threshold 512may be a constant that is hardwired into the system 500A, or a constantthat may be configurable by a user of the system 500A. First, in block601, the counter 510 is set to zero by the counter reset signal 508.Counter reset signal 508 may be triggered to reset the counter 510 tozero when a new entry is written into the metadata PWQ 502; the newentry may have a valid tag 503 that is set to valid, i.e., true. Then,in block 602, the counter 510 is incremented by multiplexer 509 andincrement logic 511 based on count signal 507. In some embodiments, thecount signal 507 may be triggered each time an operation checkpoints andleaves the pipeline, and the counter 510 is therefore incremented bymultiplexer 509 and increment logic 511 each time an operationcheckpoints and leaves the pipeline. Next, in block 603, the invalidatelogic 513 determines whether the value of counter 510 is equal to thethreshold 512. If the value of counter 510 is equal to the threshold512, the invalidate logic 513 triggers invalidate signal 514, whichinvalidates all of the entries in the metadata PWQ 502 by setting eachentry's respective valid tag 503 to, for example, false. Method 600 maybe repeated, starting at block 601, every time a new entry is writteninto the metadata PWQ 502. Incrementing of the counter 510 andinvalidation of entries, as described with respect to blocks 602 and603, may also be repeated as necessary.

FIG. 7 shows another embodiment of a method 700 for counter-based entryinvalidation for a metadata PWQ. FIG. 7 is discussed with respect toFIGS. 5A-B. Method 700 is applied in an embodiment of a system 500B suchas was shown in FIG. 5B, including a plurality of counters 510A-D, eachwith associated reset and increment logic (i.e., counter reset signal508, multiplexer 509, and increment logic 511). Each of the counters510A-D is associated with a single respective entry in the metadata PWQ502, and a single threshold 512 is applied to each of the plurality ofcounters 510A-D. In various embodiments of method 700 of FIG. 7, thethreshold 512 may be a constant that is hardwired into the system500A-B, or a constant that may be configurable by a user of the system500A-B. First, in block 701, when a new entry is written into themetadata PWQ 502, the counter reset signal 508 for with the particularcounter of counters 510A-D that is associated with the new entry istriggered, resetting the counter that is associated with the new entryto zero. The new entry may have its valid tag 503 set to valid, i.e.,true. Then, in block 702, each of the plurality of counters 510A-D isincremented simultaneously based on the count signal 507. In someembodiments, the count signal 507 may be triggered each time anoperation checkpoints and leaves the pipeline, and each counter 510A-Dof the plurality of counters is therefore incremented by its respectivemultiplexer 509 and increment logic 511 each time an operationcheckpoints and leaves the pipeline. Next, in block 703, the invalidatelogic 513 determines whether the value of one or more of the pluralityof counters 510A-D is equal to the threshold 512. If the value of any ofthe counters 510A-D is equal to the threshold 512, the invalidate logic513 triggers invalidate signal 514, which invalidates any entries in themetadata PWQ 502 that are associated with the one or more of thecounters 510A-D that were equal to the threshold 512. Invalidation maybe performed by setting the one or more entry's respective valid tag 503to false. Method 700 may be repeated whenever a new entry is writteninto the metadata PWQ 502. Incrementing of the counters 510A-D andinvalidation of associated entries, as described with respect to blocks702 and 703, may also be repeated as necessary.

FIG. 8 shows another embodiment of a method 800 for counter-based entryinvalidation for a metadata PWQ. FIG. 8 is discussed with respect toFIGS. 5A-5B. Method 800 is applied in an embodiment of a system 500Bsuch as was shown in FIG. 5B, including a plurality of counters, such ascounters 510A-D, each with associated reset and increment logic (i.e.,counter reset signal 508, multiplexer 509, and increment logic 511).Each of the counters 510A-D is associated with a single respective entryin the metadata PWQ 502, and the plurality of counters 510A-D each havea separate respective threshold 512. The plurality of thresholds 512 aredetermined based on the current state of the pipeline, such as pipeline100 of FIG. 1, that is associated with metadata PWQ 502. First, in block801, when a new address corresponding to an operation is written into anentry in the metadata PWQ 502, the counter reset signal 508 for theparticular counter of counters 510A-D that is associated with the newentry is triggered, resetting the counter associated with the new entryto zero. Next, in block 802, a new threshold 512 is determined for thecounter that was reset in block 801. In some embodiments, the thresholdmay be based on a total number of operations that are in the pipeline atthe time of the write of the entry into the metadata PWQ. In otherembodiments, the threshold may be based on a number of instances of theparticular operation that are in the pipeline at the time of the writeof an entry for the particular operation into the metadata PWQ. Flowthen proceeds to block 803, in which each of the counters 510A-D areincremented simultaneously by each counter's respective multiplexer 509and increment logic 511 based on the count signal 507. In someembodiments, the count signal 507 may be triggered each time anoperation checkpoints and leaves the pipeline, and each counter 510A-Dof the plurality of counters is therefore incremented by its respectivemultiplexer 509 and increment logic 511 each time an operationcheckpoints and leaves the pipeline. Then, in block 804, the invalidatelogic 513 determines whether the value of any of the counters 510 of theplurality of counters is equal to the counter's respective threshold512. If the value of any of the counters 510A-D is equal to thecounter's respective threshold 512, the invalidate logic 513 triggersinvalidate signal 514, which sets the valid tag 503 in any entries inthe metadata PWQ 502 that are associated with the one or more counters510 that were equal to their respective threshold 512 to false. Method800 may be repeated whenever a new entry is written into the metadataPWQ 502, and incrementing of the counters 510A-D and invalidation ofassociated entries, as described with respect to blocks 803 and 804, mayalso be repeated as necessary.

As described above, embodiments can be embodied in the form ofcomputer-implemented processes and apparatuses for practicing thoseprocesses. An embodiment may include a computer program product 900 asdepicted in FIG. 9 on a computer readable/usable medium 902 withcomputer program code logic 904 containing instructions embodied intangible media as an article of manufacture. Exemplary articles ofmanufacture for computer readable/usable medium 902 may include floppydiskettes, CD-ROMs, hard drives, universal serial bus (USB) flashdrives, or any other computer-readable storage medium, wherein, when thecomputer program code logic 904 is loaded into and executed by acomputer, the computer becomes an apparatus for practicing theinvention. Embodiments include computer program code logic 904, forexample, whether stored in a storage medium, loaded into and/or executedby a computer, or transmitted over some transmission medium, such asover electrical wiring or cabling, through fiber optics, or viaelectromagnetic radiation, wherein, when the computer program code logic904 is loaded into and executed by a computer, the computer becomes anapparatus for practicing the invention. When implemented on ageneral-purpose microprocessor, the computer program code logic 904segments configure the microprocessor to create specific logic circuits.

Technical effects and benefits include prevention of incorrect blockingof writes into the metadata store by the metadata PWQ in a processor.

The terminology used herein is for the purpose of describing particularembodiments only and is not intended to be limiting of the invention. Asused herein, the singular forms “a”, ^(an) _(and) ^(the) are intended toinclude the plural forms as well, unless the context clearly indicatesotherwise. It will be further understood that the terms “comprises”and/or “comprising,” when used in this specification, specify thepresence of stated features, integers, steps, operations, elements,and/or components, but do not preclude the presence or addition of oneor more other features, integers, steps, operations, elements,components, and/or groups thereof.

The corresponding structures, materials, acts, and equivalents of allmeans or step plus function elements in the claims below are intended toinclude any structure, material, or act for performing the function incombination with other claimed elements as specifically claimed. Thedescription of the present invention has been presented for purposes ofillustration and description, but is not intended to be exhaustive orlimited to the invention in the form disclosed. Many modifications andvariations will be apparent to those of ordinary skill in the artwithout departing from the scope and spirit of the invention. Theembodiment was chosen and described in order to best explain theprinciples of the invention and the practical application, and to enableothers of ordinary skill in the art to understand the invention forvarious embodiments with various modifications as are suited to theparticular use contemplated.

As will be appreciated by one skilled in the art, aspects of the presentinvention may be embodied as a system, method or computer programproduct. Accordingly, aspects of the present invention may take the formof an entirely hardware embodiment, an entirely software embodiment(including firmware, resident software, micro-code, etc.) or anembodiment combining software and hardware aspects that may allgenerally be referred to herein as a “circuit,” “module” or “system.”Furthermore, aspects of the present invention may take the form of acomputer program product embodied in one or more computer readablemedium(s) having computer readable program code embodied thereon.

Any combination of one or more computer readable medium(s) may beutilized. The computer readable medium may be a computer readable signalmedium or a computer readable storage medium. A computer readablestorage medium may be, for example, but not limited to, an electronic,magnetic, optical, electromagnetic, infrared, or semiconductor system,apparatus, or device, or any suitable combination of the foregoing. Morespecific examples (a non-exhaustive list) of the computer readablestorage medium would include the following: an electrical connectionhaving one or more wires, a portable computer diskette, a hard disk, arandom access memory (RAM), a read-only memory (ROM), an erasableprogrammable read-only memory (EPROM or Flash memory), an optical fiber,a portable compact disc read-only memory (CD-ROM), an optical storagedevice, a magnetic storage device, or any suitable combination of theforegoing. In the context of this document, a computer readable storagemedium may be any tangible medium that can contain, or store a programfor use by or in connection with an instruction execution system,apparatus, or device.

A computer readable signal medium may include a propagated data signalwith computer readable program code embodied therein, for example, inbaseband or as part of a carrier wave. Such a propagated signal may takeany of a variety of forms, including, but not limited to,electro-magnetic, optical, or any suitable combination thereof. Acomputer readable signal medium may be any computer readable medium thatis not a computer readable storage medium and that can communicate,propagate, or transport a program for use by or in connection with aninstruction execution system, apparatus, or device.

Program code embodied on a computer readable medium may be transmittedusing any appropriate medium, including but not limited to wireless,wireline, optical fiber cable, RF, etc., or any suitable combination ofthe foregoing.

Computer program code for carrying out operations for aspects of thepresent invention may be written in any combination of one or moreprogramming languages, including an object oriented programming languagesuch as Java, Smalltalk, C++ or the like and conventional proceduralprogramming languages, such as the “C” programming language or similarprogramming languages. The program code may execute entirely on theuser's computer, partly on the user's computer, as a stand-alonesoftware package, partly on the user's computer and partly on a remotecomputer or entirely on the remote computer or server. In the latterscenario, the remote computer may be connected to the user's computerthrough any type of network, including a local area network (LAN) or awide area network (WAN), or the connection may be made to an externalcomputer (for example, through the Internet using an Internet ServiceProvider).

Aspects of the present invention are described above with reference toflowchart illustrations and/or schematic diagrams of methods, apparatus(systems) and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer program instructions. These computer program instructions maybe provided to a processor of a general purpose computer, specialpurpose computer, or other programmable data processing apparatus toproduce a machine, such that the instructions, which execute via theprocessor of the computer or other programmable data processingapparatus, create means for implementing the functions/acts specified inthe flowchart and/or block diagram block or blocks.

These computer program instructions may also be stored in a computerreadable medium that can direct a computer, other programmable dataprocessing apparatus, or other devices to function in a particularmanner, such that the instructions stored in the computer readablemedium produce an article of manufacture including instructions whichimplement the function/act specified in the flowchart and/or blockdiagram block or blocks.

The computer program instructions may also be loaded onto a computer,other programmable data processing apparatus, or other devices to causea series of operational steps to be performed on the computer, otherprogrammable apparatus or other devices to produce a computerimplemented process such that the instructions which execute on thecomputer or other programmable apparatus provide processes forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks.

As described above, embodiments can be embodied in the form ofcomputer-implemented processes and apparatuses for practicing thoseprocesses. In embodiments, the invention is embodied in computer programcode executed by one or more network elements. Embodiments include acomputer program product on a computer usable medium with computerprogram code logic containing instructions embodied in tangible media asan article of manufacture. Exemplary articles of manufacture forcomputer usable medium may include floppy diskettes, CD-ROMs, harddrives, universal serial bus (USB) flash drives, or any othercomputer-readable storage medium, wherein, when the computer programcode logic is loaded into and executed by a computer, the computerbecomes an apparatus for practicing the invention. Embodiments includecomputer program code logic, for example, whether stored in a storagemedium, loaded into and/or executed by a computer, or transmitted oversome transmission medium, such as over electrical wiring or cabling,through fiber optics, or via electromagnetic radiation, wherein, whenthe computer program code logic is loaded into and executed by acomputer, the computer becomes an apparatus for practicing theinvention. When implemented on a general-purpose microprocessor, thecomputer program code logic segments configure the microprocessor tocreate specific logic circuits.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof code, which comprises one or more executable instructions forimplementing the specified logical function(s). It should also be notedthat, in some alternative implementations, the functions noted in theblock may occur out of the order noted in the figures. For example, twoblocks shown in succession may, in fact, be executed substantiallyconcurrently, or the blocks may sometimes be executed in the reverseorder, depending upon the functionality involved. It will also be notedthat each block of the block diagrams and/or flowchart illustration, andcombinations of blocks in the block diagrams and/or flowchartillustration, can be implemented by special purpose hardware-basedsystems that perform the specified functions or acts, or combinations ofspecial purpose hardware and computer instructions.

What is claimed is:
 1. A computer program product for implementingcounter-based entry invalidation for a metadata previous write queue(PWQ), the computer program product comprising: a tangible storagemedium readable by a processing circuit and storing instructions forexecution by the processing circuit for performing a method comprising:writing, by a processor, an address into an entry in the metadata PWQ,the address being associated with an instance of metadata received froma pipeline; setting a valid tag associated with the entry in themetadata PWQ to valid; initializing a counter to zero; incrementing thecounter based on receiving a count signal from the pipeline until thecounter is equal to a threshold; and setting the valid tag to invalidbased on the counter being equal to the threshold.
 2. The computerprogram product of claim 1, wherein the metadata PWQ comprises aplurality of entries, each of the plurality of entries having anassociated respective valid tag, and wherein setting the valid tag toinvalid further comprises setting each of the plurality of valid tagsassociated with the plurality of entries to invalid.
 3. The computerprogram product of claim 1, wherein the metadata PWQ comprises aplurality of entries, and further comprising a plurality of counters,each of the plurality of counters being associated with a respectiveentry of the plurality of entries.
 4. The computer program product ofclaim 3, wherein initializing a counter to zero comprises initializing arespective counter of the plurality of counters associated with theentry to zero based on writing an address into the entry.
 5. Thecomputer program product of claim 3, further comprising incrementingeach of the plurality of counters simultaneously based on the countsignal from the pipeline.
 6. The computer program product of claim 3,further comprising a plurality of thresholds, each threshold beingassociated with a respective counter of the plurality of counters, andwherein determining whether the counter is equal to the thresholdcomprises determining whether the counter is equal to counter'srespective threshold.
 7. The computer program product of claim 6,wherein a value of a threshold is determined based on one of a number ofoperations associated with the address that are in the pipeline at thetime of writing the address into the entry in the metadata PWQ, and atotal number of operations in the pipeline at the time of writing theaddress into the entry in the metadata PWQ.
 8. The computer programproduct of claim 1, further comprising: receiving an address and aninstance of metadata for writing into a metadata store associated withthe metadata PWQ; determining whether a matching entry for the addressexists in the metadata PWQ; determining whether a valid tag in thematching entry is set to valid based on determining that the matchingentry for the address exists in the metadata PWQ; and avoiding writingthe address and the instance of metadata into the metadata store basedon determining that the valid tag in the matching entry is set to valid.9. A computer implemented method for counter-based entry invalidationfor a metadata previous write queue (PWQ), the method comprising:writing, by a processor, an address into an entry in the metadata PWQ,the address being associated with an instance of metadata received froma pipeline; setting a valid tag associated with the entry in themetadata PWQ to valid; initializing a counter to zero; incrementing thecounter based on receiving a count signal from the pipeline until thecounter is equal to a threshold; and setting the valid tag to invalidbased on the counter being equal to the threshold.
 10. The computerimplemented method of claim 9, wherein the metadata PWQ comprises aplurality of entries, each of the plurality of entries having anassociated respective valid tag, and wherein setting the valid tag toinvalid further comprises setting each of the plurality of valid tagsassociated with the plurality of entries to invalid.
 11. The computerimplemented method of claim 9, wherein the metadata PWQ comprises aplurality of entries, and further comprising a plurality of counters,each of the plurality of counters being associated with a respectiveentry of the plurality of entries.
 12. The computer implemented methodof claim 11, wherein initializing a counter to zero comprisesinitializing a respective counter of the plurality of countersassociated with the entry to zero based on writing an address into theentry.
 13. The computer implemented method of claim 11, furthercomprising incrementing each of the plurality of counters simultaneouslybased on the count signal from the pipeline.
 14. The computerimplemented method of claim 11, further comprising a plurality ofthresholds, each threshold being associated with a respective counter ofthe plurality of counters, and wherein determining whether the counteris equal to the threshold comprises determining whether the counter isequal to counter's respective threshold.
 15. The computer implementedmethod of claim 14, wherein a value of a threshold is determined basedon one of a number of operations associated with the address that are inthe pipeline at the time of writing the address into the entry in themetadata PWQ, and a total number of operations in the pipeline at thetime of writing the address into the entry in the metadata PWQ.
 16. Acomputer system for counter-based entry invalidation for a metadataprevious write queue (PWQ), the system comprising: a processor; apipeline associated with the processor; and a metadata PWQ, the systemconfigured to perform a method comprising: writing, by the processor, anaddress into an entry in the metadata PWQ, the address being associatedwith an instance of metadata received from a pipeline; setting a validtag associated with the entry in the metadata PWQ to valid; initializinga counter to zero; incrementing the counter based on receiving a countsignal from the pipeline until the counter is equal to a threshold; andsetting the valid tag to invalid based on the counter being equal to thethreshold.
 17. The computer system of claim 16, wherein the metadata PWQcomprises a plurality of entries, each of the plurality of entrieshaving an associated respective valid tag, and wherein setting the validtag to invalid further comprises setting each of the plurality of validtags associated with the plurality of entries to invalid.
 18. Thecomputer system of claim 16, wherein the metadata PWQ comprises aplurality of entries, and further comprising a plurality of counters,each of the plurality of counters being associated with a respectiveentry of the plurality of entries.
 19. The computer system of claim 18,wherein initializing a counter to zero comprises initializing arespective counter of the plurality of counters associated with theentry to zero based on to writing an address into the entry.
 20. Thecomputer system of claim 18, further comprising incrementing each of theplurality of counters simultaneously based on the count signal from thepipeline.